//
//  CustomerServiceViewController.swift
//  ZNZXSuperMarket
//
//  Created by 四川中农 on 2018/8/8.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class CustomerServiceViewController: BaseViewController {
    
    @IBOutlet weak var borderView: UIView!
    @IBOutlet weak var textField: UITextField!
    @IBOutlet weak var tableView: UITableView!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.title = "客户服务"
        
        self.borderView.setCornerRadio(radio: 22.5, isMask: false)
        self.borderView.setBorder(color: "#cdcdcd", width: 0.5)
        self.view.backgroundColor = UIColor.nav_color
        self.tableView.rowHeight = UITableViewAutomaticDimension
        self.tableView.estimatedRowHeight = 100
        Utils.setTextFieldPlaceholderColor(textField: self.textField)
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.setNavigationBarHidden(false, animated: true)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    // MARK:发送
    @IBAction func sendButtonClick(_ sender: UIButton) {
        
    }
    

}

extension CustomerServiceViewController:UITableViewDelegate,UITableViewDataSource{
    func numberOfSections(in tableView: UITableView) -> Int {
        return 2
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 1
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        if indexPath.section == 0 {
            let cell = tableView.dequeueReusableCell(withIdentifier: "CustomerServiceSystemTableViewCell") as! CustomerServiceSystemTableViewCell
            return cell
        }else{
            let cell = tableView.dequeueReusableCell(withIdentifier: "CustomerServiceMyTableViewCell") as! CustomerServiceMyTableViewCell
            return cell
        }
    }
    
    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
        return 30
    }
    
    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
        return 0.01
    }
    
}














